package com.linln.common.data;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.linln.common.utils.HttpServletUtil;
import org.springframework.data.domain.Sort;

/**
 * @author Administrator
 */
public class MybatisPage {

    /**
     *  创建分页排序对象
     * @return
     */
    public static <T> IPage<T> pageRequest(){
        Integer pageIndex = HttpServletUtil.getParameterInt("page", 1);
        Integer pageSize = HttpServletUtil.getParameterInt("size", 10);
        IPage<T> page = new Page(pageIndex,pageSize);
        return page;
    }
}
